set(FOLDER_NAME Application)
set(LIBRARY_NAME WhiteTest)

set(CURRENT_INCLUDE_FILE_PATH ${INCLUDE_FILE_PATH}/${FOLDER_NAME}/${LIBRARY_NAME})
set(CURRENT_SOURCE_FILE_PATH ${SOURCE_FILE_PATH}/${FOLDER_NAME}/${LIBRARY_NAME})

file(GLOB_RECURSE HEADER_FILES ${CURRENT_SOURCE_FILE_PATH}/*.h)
source_group(TREE ${CURRENT_SOURCE_FILE_PATH} PREFIX "Header Files" FILES ${HEADER_FILES})

file(GLOB_RECURSE SOURCE_FILES ${CURRENT_SOURCE_FILE_PATH}/*.cpp)
source_group(TREE ${CURRENT_SOURCE_FILE_PATH} PREFIX "Source Files" FILES ${SOURCE_FILES})

set(LIBRARY_SRCS ${HEADER_FILES} ${SOURCE_FILES})
add_executable(${LIBRARY_NAME} ${LIBRARY_SRCS})
set_target_properties(${LIBRARY_NAME} PROPERTIES FOLDER ${FOLDER_NAME})

target_link_libraries(${LIBRARY_NAME}
    PRIVATE 
    GTest::gtest
    Data
)

add_custom_command(TARGET ${LIBRARY_NAME} POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_RUNTIME_DLLS:${LIBRARY_NAME}> $<TARGET_FILE_DIR:${LIBRARY_NAME}>
    COMMAND_EXPAND_LISTS
)